import request from '@/utils/request'

// 查询车主预约列表
export function listAppointment(query) {
  return request({
    url: '/bysj/receptionist/list',
    method: 'get',
    params: query
  })
}

export function listOrder(query) {
  return request({
    url: '/bysj/receptionist/order',
    method: 'get',
    params: query
  })
}

export function listOrder2(query) {
  return request({
    url: '/bysj/receptionist/orderList',
    method: 'get',
    params: query
  })
}
// 查询车主预约详细
export function getAppointment(appointmentId) {
  return request({
    url: '/bysj/receptionist/appointment/' + appointmentId,
    method: 'get'
  })
}

// 新增车主预约
export function addAppointment(data) {
  return request({
    url: '/bysj/appointment',
    method: 'post',
    data: data
  })
}

// 修改车主预约
export function updateAppointment(data) {
  return request({
    url: '/bysj/receptionist',
    method: 'put',
    data: data
  })
}

// 新增取车登记
export function addReception(data) {
  return request({
    url: '/bysj/receptionist/receptionadd',
    method: 'post',
    data: data
  })
}

export function updatePay(data) {
  return request({
    url: '/bysj/receptionist/pay',
    method: 'put',
    data: data
  })
}

// 查询订单详细
export function getOrder(orderId) {
  return request({
    url: '/bysj/receptionist/order/' + orderId,
    method: 'get'
  })
}
